// Because <ie9 doesn't know what video is.
video { display: block; }

// Hide video on mobile
@media screen and (max-device-width: 800px) {
  .video-background video {
    display: none;
  }
}

.video-background {
  position: absolute;
  overflow: hidden;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: image-url('home_video_first_frame.jpeg') no-repeat center center;
  background-size: cover;
  background-color: #243B21; // a dark green to match the video

  min-width: 100%; min-height: 100%;
  width: auto; height: auto; z-index: -100;

  video {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    min-width: 100%; min-height: 10%;
    width: auto; height: auto; z-index: -100;
    /*background: image-url('home_video_first_frame.jpeg') no-repeat center center;*/
    background-size: cover;
  }
}

.hero {
  position: relative;
  transition: 0.3s;
  height: $hero-height-small;

  // Keep hero large enough for how-it-works on large screens
  @media #{$medium-up} {
    height: $hero-height-medium;
  }

  .hero-title-content {
    position: absolute;
    height: 225px;
    left: 0;
    top: 50%;
    right: 0;
    margin-top: -150px;
  }

  h1 {
    color: $white;
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 0;
    text-shadow: 0 -1px 1px rgba(0,0,0,0.6);  
  }

  h2 {
    color: $white;
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0;
    text-shadow: 0 -1px 1px rgba(0,0,0,0.6);
  }

  button.how-it-works-button {
    background-color: rgba(153,153,153,0.5);
    border-radius: 3px;
    color: $white;
    display: block;
    font-weight: 800;
    margin-left: auto;
    margin-right: auto;
    margin-top: 1rem;
    margin-bottom: 2rem;

    &:hover {
    background-color: rgba(153,153,153,0.7);
    }
  }

  // The search bar is laid out with tables.
  // Yes this makes sense...for backwards compatability and feeling bad
  // Eventually we will have the sweet, sweet flexbox.
  .search-bar-container {
    display: table;
    margin: 1.5rem auto;
    max-width: 750px;
    width: 100%;
    height: 50px;
  }

  .search-bar {
    padding: 0 1rem;
    position: relative;
    $search-bar-height: 50px;

    .search-input-container {
      // display: table-cell;
      // width: 100%;

      // Typeahead dropdown
      .f-dropdown {
        margin-top: 0;
        text-align: left;

        // dropdown carrat
        &:before, &:after {
          display: none;
        }
      }
    }
    .crops-loading-spinner {
      position: absolute;
      background: $white;
      width: 100%;
      padding: 4px;
      display: block;
    }

    .search-input {
      background-color: $white;
      color: $off-black;
      display: table-cell;
      font-size: 1.2em;
      height: $search-bar-height;
      margin: 0;
      padding: 0 1rem;
      width: 100%;
    }

    .search-button-container {
      display: table-cell;
      width: auto;
    }

    .search-button {
      border-radius: 0;
      color: $white;
      display: table-cell;
      font-size: 1.2em;
      height: $search-bar-height;
      padding: 0 35px;
      right: 0;
      top: 0;
      box-shadow: none;

      &:hover {
        background-color: rgba(106, 168, 79, 1);
      }

      // Make the search button take up less room on mobile
      @media #{$small-only} {
        padding: 0 15px;
      }
    }
  }

  .search {
    background-color: rgba(0, 0, 0, 0.6);
    bottom: 0;
    left: 0;
    position: absolute;
    right: 0;
    z-index: 2;
  }
}

.guide-count {
  float: right;
  font-weight: bold;
  line-height: 3em;
}

.crop-list-item {
  font-size: 16px;
}

.crop-name {
  padding-left: 1em;
}

.guide-count {
  padding-right: 1em;
}

.crop-img {
  height: 50px;
  object-fit: cover;
}

.survey {
  background-color: $gray-green;
  padding: 1.25em 0 1.5em;
  text-align: center;
}

.survey-heading {
  margin-bottom: 1em;

  @media #{$medium-up} {
    display: inline-block;
    margin-right: 2em;
    margin-bottom: 0;
  }
}

.survey-button {
  color: $white;
  background-color: $brown;
  padding: .75em 2.25em;
  font-size: .875em;

  &:hover,
  &:focus,
  &:active {
    color: $white;
  }
}

.survey-button-img {
  margin-top: -2px;
}

